Skip to content

Preserve Ghostty base font when changing text size - #15060

Open
leftspin wants to merge 8 commits into
omacom:quattrofrom
leftspin:fix/ghostty-text-size-scaling
Open

leftspin wants to merge 8 commits into
omacom:quattrofrom
leftspin:fix/ghostty-text-size-scaling

Conversation

@leftspin

@leftspin leftspin commented Oct 11, 2026 •

Copy link
Copy Markdown

Omarchy's text-size action changes both GTK's text-scaling factor and Ghostty's base font-size. Ghostty follows GTK scaling too, so selecting 20px can compound a 15pt base into roughly 24.5pt effective text. Reset also overwrites a personal Ghostty base size.

This keeps the shell and GTK text-size behavior, plus sizing for other terminals, while leaving Ghostty's config and reload signal alone. It checks the GSettings write before changing the shell or other terminal settings. Existing Ghostty values, including a 15pt value from a prior run, remain untouched; the command does not infer or migrate a personal preference.

./test/shell.d/ghostty-text-size-test.sh passes isolated HOME/GSettings checks for 20px, reset, a fresh-process read, stock and personal base sizes, a symlinked config, and failed GSettings writes. bash -n bin/omarchy-display-text-size and git diff --check pass. The original script fails the config-preservation test. Installed-session behavior has not been claimed.

Fixes #14221

Fixes #20723

@leftspin

Copy link
Copy Markdown
Author

Closing this upstream proposal because the Scottland Omarchy adapter PO has now selected session-scoped adapter interception for this task and ruled out a parallel upstream lane. The isolated regression evidence remains preserved; no upstream merge or installed behavior is claimed.

@leftspin leftspin closed this Oct 11, 2026
@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the previous finding is addressed and no new actionable issues remain.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous finding is addressed and no new actionable issues remain.

Summary

Preserves Ghostty’s base font while changing desktop text size.

  • Text-size changes leave Ghostty’s base font alone.

No new actionable issues were found in the changes since the previous review.

Reviews (7) · Last reviewed commit: "Keep Ghostty coverage with the desktop h..." · Reviewed by Greptile

Comment thread test/ghostty-text-size-test.py Resolved
Comment thread test/ghostty-text-size-test.py Resolved
@leftspin leftspin reopened this Oct 11, 2026
Comment thread bin/omarchy-display-text-size Resolved
@jandrusk

Copy link
Copy Markdown

This matches #14221 (Ghostty font doubled via GTK scale + base font-size rewrite). Skipping Ghostty in set_terminal_size and failing hard on gsettings errors looks right; the Python contract tests are thorough.

Ready for review from my side — please link #14221 in the PR body if not already.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified on a worker VM built from the Omarchy ISO, with Ghostty 1.3.1 and Foot 1.28, measuring each terminal's cell size in pixels with CSI 16 t. At text size 16, quattro's script leaves Ghostty at 29×13 against Foot's 22×10, the double scaling #14221 describes; with this branch Ghostty is 21×10 against 22×10, and at 20 it is 26×12 against 27×12. Putting the old script back brings the 29×13 straight back. ./test/cli and the Kitty font test pass on the worker. This fixes #14221, and the pull request now says so.

Two commits pushed to the branch:

  • ffc24ee — omarchy display text size with no arguments read Ghostty's font-size first, so after setting 16px it reported "terminal font: 9 pt" while Alacritty, Kitty and Foot were at 12. It now skips Ghostty, whose value is a base the GTK factor scales rather than the size this command sets.
  • aaea212 — test/shell only runs test/shell.d/*-test.sh, so test/ghostty-text-size-test.py never ran. The same checks now live in test/shell.d/ghostty-text-size-test.sh; it passes on the worker against this branch and fails against quattro's script.

One thing for the maintainer to decide: anyone who already used the text-size control keeps the Ghostty size the old script wrote (12 after choosing 16, 8 after the Dell XPS 13 install's 11), and that value is now scaled again by the GTK factor. On the worker, a config left at 12 by the old script still draws 29×13 at size 16 with this branch, and reset no longer brings Ghostty back to 9, so after a reset Ghostty draws 21×10 against Foot's 17×7. Restoring font-size = 9 on reset, or a migration that resets Ghostty only where it still holds the value the old script computed, would close that; which, if either, is a product call, since either can overwrite a size someone chose deliberately.

Codex Medium reviewed the final branch as a second opinion. It agreed the fix is sound and proportionate and that the new test fails against the old script, and agreed the existing-user gap above is real; that agreement is not guaranteed independent. It also raised two points that did not hold up: that making the gsettings write fatal could abort user setup on the XPS 13 install, and that a failed write would leave the monitor panel showing a size that was never applied. On the worker gsettings set and reset exit 0 even with no session bus, so neither path is reachable by the failure that makes them plausible.

This also touches the same Ghostty reload line as #14900, so whichever lands second needs a small conflict resolved. Waiting on the maintainer.

Mike Manzano and others added 6 commits November 7, 2026 05:42
The command no longer writes Ghostty's font-size, so reading it first made `omarchy display text size` print 9 pt after setting 16px while every other terminal was at 12 pt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test/shell only runs test/shell.d/*-test.sh, so the Python test at test/ghostty-text-size-test.py never ran. The same checks now live there as a bash test: Ghostty's config and symlinks left alone through size and reset, no Ghostty reload signal, the other terminals still sized, the size report, and a refused GSettings write changing nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leftspin
leftspin force-pushed the fix/ghostty-text-size-scaling branch from aaea212 to 86a905b Compare November 7, 2026 05:46
@leftspin

leftspin commented Nov 7, 2026

Copy link
Copy Markdown
Author

Hello Omarchy maintainers — could someone review this PR when you have a chance? It is refreshed onto current quattro (14abc076), retains the translated Foot restart notice, and avoids writing Ghostty config or changing existing personal font-size overrides. The focused shell regression, bash -n, git diff --check, and Greptile Review check pass. The full suite and installed-session behavior have not been tested. Greptile’s open note about panel-preview state after a failed GSettings write remains in the discussion for your judgment. Thank you!

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 7, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I looked at this again after the rebase onto quattro. The script at 86a905b8 is the same as the version verified on a worker on Oct 17. The only new commit, 86a905b8, adds a test for the Foot restart notice, and that notice already works this way on quattro. Nothing was run this time.

This pull request is not the only one fixing #14221. #14261 by @sanjyay was opened a week earlier, on Oct 4, and fixes the same double scaling a different way. It keeps writing Ghostty's font-size, divided by the GTK factor that is actually in effect, so at size 16 it writes 8.8 and Ghostty draws at 12 pt. This one stops writing Ghostty's size at all.

For someone who has never used the text-size control, both fixes give the same result. The difference is everyone who already has. The old command left Ghostty at its own computed size: 12 after choosing 16, or 8 after the Dell XPS 13 install's size 11. With this branch that value stays and is scaled again by the GTK factor. On the Oct 17 worker run, a config left at 12 still drew 29×13 cells at size 16, the size #14221 reported, and reset no longer brings it back to 9. #14261 overwrites the value on the next size change and writes 9 on reset, so those users are fixed too.

The one thing this branch does that #14261 does not is keep a Ghostty size someone chose by hand. quattro already overwrites that today. The script also cannot tell a size someone chose from a size the old command wrote, and that is exactly why it misses the case above. #16355, which changes how the GTK factor is calculated, makes the difference wider. If it lands, size 16 sets the factor to 1.0, and this branch would leave Ghostty at 9 pt while the other terminals are at 12. #14261 reads the factor back and would still match them.

Our rule for competing fixes is that the older one wins unless the newer one is clearly better. Here the older one handles a case this one misses, so #14261 is the one omabot will verify and put to the maintainer. I have not added anything from this branch to it. #14261 already uses the GTK factor that actually took effect, so a failed write still leaves Ghostty at the right size. Making a failed gsettings write fatal, as this branch does, would also need changes in the monitor panel and the XPS 13 install script, and neither pull request changes those files.

Who checked this: Codex Medium and muse-wonder (via pi, thinking high) compared the two diffs as a second opinion, without being told my answer. Both picked #14261 for the same reason: it repairs sizes the old command wrote, and this branch does not. Their independence is not guaranteed. Codex Medium also agreed this is a bug. Thank you, @leftspin, for the thorough work and the tests. Choosing between the two is the maintainer's decision, and this pull request is waiting on them.

Keep quattro's symlink-safe edits for the shell and other terminals. The Ghostty base size is left to the user, so check that desktop text sizing leaves its symlink target's font-size intact.

Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 29, 2026
Comment thread test/shell.d/ghostty-text-size-test.sh Resolved
Run the text-size checks inside the existing desktop helpers suite. The subshell keeps the temporary HOME, mock commands, and cleanup isolated from the symlink and clipboard checks.

Co-Authored-By: GPT-6.2 Sol <noreply@openai.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Nov 29, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I resolved the conflict with quattro in 1547a82b, keeping the symlink-safe writes for the shell and other terminals. afe3f779 moves the Ghostty and Foot checks into test/shell.d/desktop-helpers-test.sh.

On an Omarchy ISO worker with Ghostty 1.4.0, selecting desktop size 16 with the stock font went from 29×13-pixel cells on quattro to 21×10 with the fix. At desktop size 12, quattro changed a custom 15 pt font to 9 pt. The fix kept it at 15 pt, and GTK still resized the text at size 16. Restoring the base command reproduced both failures.

Before: desktop size 12 overwrites the custom 15 pt Ghostty font

After: the same desktop size keeps the custom 15 pt Ghostty font

That custom-font case in #20723 is why I advanced this approach over #14261. The older fix compensates for double scaling by rewriting Ghostty’s size, which also repairs values previously written by the old command. This PR preserves both intentional settings and previously overwritten values, including on reset.

The CLI, desktop helpers and monitor tests passed on the worker. The aggregate run also hit the same audio panel opening, OEM console logo and runtime smoke IPC failures reproduced on quattro. GitHub’s Tests and translation workflows are waiting for maintainer approval.

GPT-6.2 Sol in Codex ran the worker checks. Opus 5.5 High and muse-wonder via pi at high effort checked the competing fixes and both commits. They agreed on the trade-off and found no further defect in the changes. Their independence remains uncertain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy display text size scales the Ghostty font two times Ghostty Does Not Respect System Text Scaling or custom font size

3 participants